#include <vector>

#include "timedCallback.h"

#if 0
// deprecated

//--- GLOBAL VARIABLES ---//
static std::vector<TimedCallback> callbacks;

void createTimedCallback(void (*func)(), float timeout, bool isRepeating) {
	callbacks.push_back(TimedCallback(func, timeout, isRepeating));
}

TimedCallback *getTimedCallback(size_t  i) {
	return &callbacks[i];
}

size_t getNumTimedCallbacks() {
	return callbacks.size();
}

void removeDeadCallbacks() {
	std::vector<TimedCallback>::iterator i = callbacks.begin();

	while (i != callbacks.end()) {
		if ((*i).isDead()) {
			i = callbacks.erase(i);
		} else {
			i++;
		}
	}
}

#endif
